package com.huawei.cloud.phone.management.application.pkg.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.huawei.cloud.phone.management.common.validate.InstallGroup;
import com.huawei.cloud.phone.management.common.validate.UninstallGroup;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class ApkDTO {
    @NotNull(message = "apk中没有pkg_name参数", groups = {InstallGroup.class, UninstallGroup.class})
    @JsonProperty("pkg_name")
    private String pkgName;

    @NotEmpty(message = "没有上传需要安装的包文件", groups = {InstallGroup.class})
    private List<MultipartFile> files;
}
